package logic;

import java.io.*;
import java.net.*;

public class NetworkClient {

	public static void main(String args[]) {
		try {
			Socket connect = new Socket("localhost", 4444);
			BufferedReader in = new BufferedReader(new InputStreamReader(connect.getInputStream()));
			System.out.print("Received string: '");

			while (!in.ready()) {
			}
			System.out.println(in.readLine());

			System.out.print("'\n");

			System.out.println(connect.getInetAddress());
			System.out.println(connect.getLocalAddress());
			System.out.println(connect.getLocalSocketAddress());
			System.out.println(connect.getRemoteSocketAddress());
			in.close();
			connect.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
